-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] ansible: Edit select-compiler.sh to select different versions of xcode #1967
Conversation
jenkins/scripts/select-compiler.sh
Outdated
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer | ||
echo "set xcode to latest - At least version 10" | ||
elif [ "$NODEJS_MAJOR_VERSION" -ge "12" ]; then | ||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this select a different version? /Applications/Xcode.app/Contents/Developer
looks identical to the section for 13?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atm it is identical becauase 12 and 13 both build on 10 +. The actual min. xcode doesnt change to version 10 until node 13 (according to BUILDING.md) so the question is do we want to use latest for these versions or hardcode in a stable version and only change it if required (security patches etc.).
For example /Applications/Xcode.11.1.app/Contents/Developer
for node 13 and then something like /Applications/Xcode10.x.app/Contents/Developer
for node 12.
Depends if we want as few xcodes on the machine as possible or if we want a stable xcode for each node release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stable for each release, decided at time of first .0.0
for that release line, never changed afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these documented anywhere as to which version is used for each release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the BUILDING.md on the relevant release branch of nodejs/node, if documented, if not.... #1522 :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're locked in to 8 for Node 12. We've historically locked in for the entirety of a release line. That could change and it would be lower risk on macOS than others, but not zero risk and the TSC would have to sign off on it and Build WG would shoulder the blame if things break. So .. for now consider it locked to Xcode 8 for Node 12.
jenkins/scripts/select-compiler.sh
Outdated
echo "set xcode to latest - At least version 10" | ||
elif [ "$NODEJS_MAJOR_VERSION" -ge "12" ]; then | ||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer | ||
echo "set xcode to latest - at least version 8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think prev line should have been 8
@AshCripps Would be good to add:
|
ATM it currently does 2 different versions based on what version of macos is on the box. So it should be easy enough to change it ive already tracked down where URLs for the different versions are so should be a simple change to install multiple versions |
build/ansible/roles/package-upgrade/files/install-xcode.sh Lines 7 to 15 in 9735105
The above lines don't work on the new nearform machines so the install-xcode script will have to be reworked to install xcode on the newer machines. Also I found this blog post https://derflounder.wordpress.com/2018/06/10/updated-xcode-command-line-tools-installer-script-now-available/ which looks remarkably similar to what we have and the original file predates install-xcode.sh by about 3 years but the repo is under the MIT license but I don't see any link to the author or repo? |
8b59977
to
37ab522
Compare
37ab522
to
473007b
Compare
Ive edited the install-xcode script to allow for the installing of xcode - there are some problems here
Ive also edited the MANUALSTEPS.md to include the sudo line needed to run xcode-select Next step is to sort out the select compiler script to change xcodes based on the OS version and what version of node is being built |
We have a spot on ci.nodejs.org where we put files required by our infra. See aix61-standalone/manualBootstrap.md for some examples of using https://ci.nodejs.org/downloads/. I don't see anything in Ansible but there was a time when I was doing ARMv7 compiler stuff on there too and I see the files are still there. |
Oh, what? so even if we stored these files they will stop being extractable? So we're going to have to put ourselves at the mercy of Apple continue to supply these files? What's the structure inside them? Is it practical to unpack and pack them up again into a format that we can properly archive for ourselves? |
Not sure, when you extract them you got a .app file which is actually a directory I believe as the xcode path becomes Ill have to try packing it up myself and see if someone else can reuse it. |
Tried this and it didnt work - showed an |
Closing this, dont think this will be needed as notorization has forced us to update the release machines to new OS |
Edited select-compiler.sh to change the xcode version used based on which version of node is being built.
Works on my local machine but needs to be checked to ensure the paths are correct on the build machines.
Will also require sudoers being edited to allow for xcode-select to run with sudo permissions.
Discussion here - #1964